package com.kingyun.gpsinspection.purificationservice.facade.service.tdm;

import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.RedisValue;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.*;

import java.util.List;

/**
 * Created by liyi on 2017/2/23.
 * 任务流程对外的接口
 */
public interface OutTaskFlowService {
    /**
     *  物资申请任务：保存物料管理信息并发起流程
     * @param materialsManage
     * @param employeeVo
     * @return
     */
    MaterialsManageVo saveMaterialsManage(RedisValue redisValue, EmployeeVo employeeVo, MaterialsManageVo materialsManage, String uploadFiles, String deletedFiles);
    /**
     * 根据主键查询物资申请任务信息
     * @param id
     * @return
     */
    MaterialsManageVo queryMaterialsManageVoById(String id) throws Exception;

    /**
     * 作业许可任务：保存作业许可并发起流程
     *
     * @param employeeVo
     * @param workPermit
     * @param uploadFiles
     * @param deletedFiles
     * @return
     * @throws Exception
     */
    WorkPermit saveWorkPermit(RedisValue redisValue, EmployeeVo employeeVo, WorkPermit workPermit, String uploadFiles, String deletedFiles, List<WorkOrderVo> workOrderList);
    /**
     * 根据主键查询物作业许可任务信息
     * @param id
     * @return
     */
    WorkPermitVo queryWorkPermitVoById(String id) throws Exception;

    /**
     * 属地监督任务：保存属地监督并发起流程
     *
     *
     * @param redisValue
     * @param employeeVo
     * @param territorialSupervision
     * @param uploadFiles
     * @param deletedFiles
     * @param workOrderList
     * @return 杨春生需要接收返回的对象取到新对象的主键ID
     */
    TerritorialSupervision saveTerritorialSupervision(RedisValue redisValue, EmployeeVo employeeVo, TerritorialSupervision territorialSupervision, String uploadFiles, String deletedFiles, List<WorkOrderVo> workOrderList);

    /**
     * 根据主键查询属地监督包装类
     * @param id
     * @return
     */
    TerritorialSupervisionVo queryTerritorialSupervisionVoById(String id) throws Exception;

    /**
     * 根据任务ID查询任务所属工单
     * @param taskId
     * @return
     * @throws Exception
     */
    List<WorkOrderVo> findListByTaskId(String taskId) throws Exception;
}
